<?php

declare(strict_types=1);

namespace App\Service;

use Hyperf\Di\Annotation\Inject;
use Hyperf\Cache\Listener\DeleteListenerEvent;
use Psr\EventDispatcher\EventDispatcherInterface;

class SystemService
{
    /**
     * @Inject
     * @var EventDispatcherInterface
     */
    protected $dispatcher;


    public function flushCache($userId) {
        var_dump(11111);
        $this->dispatcher->dispatch(new DeleteListenerEvent('user-update',[$userId]));
        return true;
    }



}